lv logical volume device files have the names /dev/dsk/lv<n> and /dev/rdsk/lv<n>, where <n> is a one or two digit integer. XLV logical volume device files have the names /dev/dsk/xlv/<volname> and /dev/rdsk/xlv/<volname>, where <volname> is an alphanumeric string that does not contain periods (dots, ".").
Filesystems can be created, mounted, and used in the normal way on logical volumes, or logical volumes can be used as block or raw devices. Logical volumes provide services such as disk plexing (also known as mirroring) and striping transparently to the applications that access the volumes. Key reasons to create a logical volume are:
A logical volume can include partitions from several physical disk drives. By default, data is written to the first disk partition, then to the second disk partition, and so on. Figure 6-1 shows the order in which data is written to partitions in a non-striped logical volume.
Figure 6-1 : Writing Data to a Non-Striped Logical Volume Also, on striped logical volumes, the volume must have equal-sized partitions on several disks. When logical volumes are striped, an amount of data, called the stripe unit, is written to the first disk, the next stripe unit amount of data is written to the second disk, and so on. When each of the disks have been written to, the next stripe unit of data is written to the first disk, the next stripe unit amount of data is written to the second disk, and so on to complete the "stripe." Figure 6-2 shows the order in which data is written to a striped logical volume.
Figure 6-2 : Writing Data to a Logical Volume Because each stripe unit in a stripe can be read and written simultaneously, I/O performance is improved. To obtain the best performance benefits of striping,try to connect the disks you are striping across on different controllers. In this arrangement, there are independent data paths between each disk and the system. However, a small performance improvement can be obtained using SCSI disks striped on the same controller.
There are two basic scenarios for creating logical volumes. In the first scenario, you start with empty disks and perform these basic steps:
The next two sections in this chapter describe the features of lv and XLV logical volumes.